<?php
	require_once($_SERVER["DOCUMENT_ROOT"]."/global.php");
	require_once($_SERVER["DOCUMENT_ROOT"]."/modules/security_mod.php");
	require_once($_SERVER["DOCUMENT_ROOT"]."/modules/channel_mod.php");

	SecurityMod::login();

	$level = $_SESSION["account"]->getLevel();
        $chatLevel = $_SESSION["account"]->getChatLevel();
	if ($level != "Admin" && $chatLevel != 3)
		SecurityMod::logout();

        $id = v($_REQUEST, "id");
        $chn = ChannelMod::getChannel($id);
?>
<html>
<head>
<title><?php echo(SettingsMod::PAGE_TITLE." :: Channel Delete"); ?></title>
<link rel="stylesheet" href="main.css">
<script src="main.js" type="text/javascript"></script>
</head>
<body>
<center>
<form method="POST" action="channel_delete_confirm.php">
<input type="hidden" name="id" value="<?php echo($chn->getId()); ?>" />
Are you sure you wish to delete the channel "<?php echo($chn->getName()); ?>"?
<br /><br />
<input type="button" value="Cancel" onclick="history.go(-1);" />
<br /><br />
<input type="submit" value="Delete Channel" />
</form>
</center>
</body>
</html>
